
INLINE bool Bundle::empty() const
{
	return packetsSize() == 0;
}

INLINE int Bundle::packetsSize() const
{
	size_t i = packets_.size();
	if(pCurrPacket_ && !pCurrPacket_->empty())
		++i;

	return i;
}

INLINE uint32 Bundle::currMsgLength() const
{ 
	return currMsgLength_; 
}
	
// INLINE void Bundle::pCurrMsgHandler(const MessageHandler* pMsgHandler)
// { 
// 	pCurrMsgHandler_ = pMsgHandler; 
// }

// INLINE const MessageHandler* Bundle::pCurrMsgHandler() const
// {
// 	return pCurrMsgHandler_;
// }

INLINE Bundle::Packets& Bundle::packets() 
{ 
	return packets_; 
}

INLINE Packet* Bundle::pCurrPacket() const
{ 
	return pCurrPacket_; 
}

INLINE void Bundle::pCurrPacket(Packet* p) 
{ 
	pCurrPacket_ = p; 
}

INLINE void Bundle::pChannel(Channel* p)
{
	pChannel_ = p;
}

INLINE Channel* Bundle::pChannel()
{
	return pChannel_;
}

// INLINE MessageID Bundle::messageID() const 
// { 
// 	return currMsgID_; 
// }

INLINE int32 Bundle::numMessages() const
{ 
	return numMessages_; 
}

INLINE void Bundle::finiCurrPacket(){ 
	packets_.push_back(pCurrPacket_); 
	pCurrPacket_ = NULL; 
}
